const mongoose = require('mongoose')
const mongoUrl = 'mongodb://localhost/blog'

module.exports = app => {
    mongoose.connect(mongoUrl,{useUnifiedTopology: true,useNewUrlParser: true})
        .then(() => console.log('数据库连接成功！'))
        .catch(err => console.log('数据库连接失败！'))
}
